#include "../../head.h"

struct msgbuf
{
    long mtype;
    char mtext[1024];
};

int main()
{
    printf("Read\n");
    key_t key = ftok(".", 10);
    int msgid = msgget(key, 0666);

    struct msgbuf text;
    memset(&text, 0, sizeof(text));
    msgrcv(msgid, &text, sizeof(text), 1, 0);
    printf("Read: %s\n", text.mtext);
}